<?php
	class Vehicle {
		protected $type;	//car, truck, motorcycle, etc.
		protected $model;	//brand and model;
		protected $color;
		protected $maxSpeed;
		protected $hp;		//horse power
		
		
		public function __construct($model, $color, $maxSpeed, $hp){
			$this->model=$model;
			$this->color=$color;
			if (is_int($maxSpeed) && $maxSpeed>0){
				$this->maxSpeed=$maxSpeed;
				}
			if (is_int($hp) && $hp>0){
				$this->hp=$hp;
				}
		}
		
		public function printInfo(){
			echo "This vehicle is a ". $this->type . " and it is "  .$this->color . ". The " . $this->type . " is a "
					. $this->model . " and its maximum speed is " . $this->maxSpeed .
					". Also, it has " . $this->hp . " horse power.";
		}
		
		public function changeColor($newColor){
			$this->color=$newColor;
		}	
	}

?>